Skip to content

Comments

[network] Performance refactoring 4.3.x#19428

Merged
lsiepel merged 3 commits intoopenhab:4.3.xfrom
Nadahar:network-performance-refactoring-4.3.x
Oct 11, 2025
Merged

[network] Performance refactoring 4.3.x#19428
lsiepel merged 3 commits intoopenhab:4.3.xfrom
Nadahar:network-performance-refactoring-4.3.x

Conversation

@Nadahar
Copy link
Contributor

@Nadahar Nadahar commented Oct 3, 2025

This is a backport that combines #17972, #18083 and #19398. This "corresponds to" #19427, but is for 4.3.x instead.

This probably shouldn't be squashed to retain the references to the original PRs.

mherwege and others added 3 commits October 3, 2025 18:11
…nhab#18083)

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
…nhab#17972)

* Fix performance
* Improvements
* Add logging
* Improve logging
* Update bundles/org.openhab.binding.network/src/main/java/org/openhab/binding/network/internal/utils/NetworkUtils.java
* Improve thread handling
* Improve shutdown
* thread cleanup
* Improve per thread allocation
* Stop on finishing all interfaces
* Change Arping to make use of completeablefeature
* Seperate presence detection from lifecycle
* Improve logging and filtering
* Create seperate ScheduledExecutorService
* Fix review comment
* Improve network address checks
* Improve interrupthandling
* Revert threadlocal
* Refactor Presencedetection
* Make LatencyParser accept Windows' <1ms syntax for minimal latency
* Remove misleading reference to non-existing NetworkHandlerBuilder
* Handle thread-safety of NetworkDiscoveryService.executorService
* Fix network interface exclusion
* Make PresenceDetectionValue thread-safe
* Partial refactoring of PresenceDetection

Fixes:
  - Synchronization of lastSeen
  - Joining of async tasks
  - Minor logging improvements
Addition:
  - Create setIcmpPingMethod()

* Partial refactoring of NetworkDiscoveryService

Fixes:
  - Correct the number of addresses in a /24 subnet.
  - Restructure task creation so that one less thread is needed per scanned address, and so that startScan() is guaranteed to return quickly.
  - Create independent threads for posting discovery results, as this can take a long time and might not finish before the executor shuts down.

* Make NetworkHandler thread-safe
* Make SpeedTestHandler thread-safe
* Make sure that process output is consumed
* Implement tool-specific latency parsing
* Fix NetworkDiscoveryService configuration and make the thread pool size configurable
* i18n
* Fix test

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Ravi Nadahar <nadahar@rediffmail.com>
…nhab#19398)

* Use a threaded consumer for Process output consumption

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will backport later when no regressions have been found and prior to next patch release.

@lsiepel
Copy link
Contributor

lsiepel commented Oct 11, 2025

Thanks, will backport later when no regressions have been found and prior to next patch release.

No problems have been reported, so i merge this now.

@lsiepel lsiepel merged commit b68805f into openhab:4.3.x Oct 11, 2025
1 check passed
@lsiepel lsiepel modified the milestone: 5.1 Oct 11, 2025
@Nadahar Nadahar deleted the network-performance-refactoring-4.3.x branch October 14, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants